package ar.uade.edu.fain.ad.client.web.servlet.empleado;

import ar.uade.edu.fain.ad.client.web.servlet.BaseServlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class LogoutServlet
 */
public class LogoutServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see BaseServlet#BaseServlet()
	 */
	public LogoutServlet() {
		super();
	}

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
	 *      response)
	 */
	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		request.getSession().removeAttribute("loginVO");
		request.getSession().removeAttribute("cajaId");
		request.getSession().removeAttribute("salonId");
		request.getSession().removeAttribute("localId");
		request.getSession().removeAttribute("mozoId");
		request.getSession().removeAttribute("rolEmpleado");
		forward("/empleado/login.action", request, response);
	}

	@Override
	protected String getViewBasePath() {
		return null;
	}

}
